prefix=/opt/wxapi-aes-sdk

all:
	@echo "usage: make <install>"
	@echo "# install wxapi-aes-sdks to ${prefix} with root"

install:
	rm -vfr Node  PHP  Python  c++
	unzip aes-sample.zip
	cd c++/src && make && ar -r libWXBizDataCrypt.a WXBizDataCrypt.o
	mkdir -pv $(prefix)/{include,lib}
	cp -v c++/src/libWXBizDataCrypt.a $(prefix)/lib
	cp -vfr c++/src/WXBizDataCrypt.h $(prefix)/include
	cp -vfr c++/lib/include64/rapidjson $(prefix)/include
	echo "----- install wxapi-aes-sdk done! -----"